package com.sleepfish.generator.domain;

import com.sleepfish.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import java.util.Objects;

/**
 * @author fumingchao
 * @Description: 数据库添加表
 * @date 2022/2/17 19:07
 */
@ApiModel(value="GenDatabaseInfo 数据库添加表", description="数据库添加表")
public class GenDatabaseInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "表ID")
    private Long tableId;

    @ApiModelProperty(value = "字段名称")
    @NotBlank(message = "表名称不能为空")
    private String fieldName;

    @ApiModelProperty(value = "字段描述")
    private String described;

    @ApiModelProperty(value = "类型")
    @NotBlank(message = "表名称不能为空")
    private String dataType;

    @ApiModelProperty(value = "长度")
    @NotBlank(message = "表名称不能为空")
    private String lenght;

    @ApiModelProperty(value = "是否必填")
    @NotBlank(message = "表名称不能为空")
    private String required;

    @ApiModelProperty(value = "是否生成")
    private String generate;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getDescribed() {
        return described;
    }

    public void setDescribed(String described) {
        this.described = described;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getLenght() {
        return lenght;
    }

    public void setLenght(String lenght) {
        this.lenght = lenght;
    }

    public String getRequired() {
        return required;
    }

    public void setRequired(String required) {
        this.required = required;
    }

    public Long getTableId() {
        return tableId;
    }

    public void setTableId(Long tableId) {
        this.tableId = tableId;
    }

    public String getGenerate() {
        return generate;
    }

    public void setGenerate(String generate) {
        this.generate = generate;
    }

    @Override
    public String toString() {
        return "GenDatabaseInfo{" +
                "id=" + id +
                ", tableId=" + tableId +
                ", fieldName='" + fieldName + '\'' +
                ", described='" + described + '\'' +
                ", dataType='" + dataType + '\'' +
                ", lenght='" + lenght + '\'' +
                ", required='" + required + '\'' +
                ", generate='" + generate + '\'' +
                '}';
    }
}
